<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->

<title>bkgd</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_002_001_292">&nbsp;</a>NAME</h4><blockquote>
bkgd, bkgdset, getbkgd, wbkgd, wbkgdset - turn off
the previous background attributes, logical OR the requested attributes
into the window rendition, and
set or get background character
and rendition using a single-byte character
</blockquote><h4><a name = "tag_002_001_293">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;<a href="curses.h.html">curses.h</a>&gt;

int bkgd(chtype <i>ch</i>);

void bkgdset(chtype <i>ch</i>);

chtype getbkgd(WINDOW *<i>win</i>);

int wbkgd(WINDOW *<i>win</i>, chtype <i>ch</i>);

void wbkgdset(WINDOW *<i>win</i>, chtype <i>ch</i>);
</code>
</pre>
</blockquote><h4><a name = "tag_002_001_294">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>bkgdset()</i>
and
<i>wbkgdset()</i>
functions turn off
the previous background attributes, logical OR the requested attributes
into the window rendition, and
set the background property of the current or specified window
based on the information in <i>ch</i>.
If <i>ch</i> refers to a multi-column character, the results are undefined.
<p>
The
<i>bkgd()</i>
and
<i>wbkgd()</i>
functions turn off
the previous background attributes, logical OR the requested attributes
into the window rendition, and
set the background property of the current or specified window and
then apply this setting to every character position in that window:
<ul>
<p>
<li>
The rendition of every character on the screen is changed to the new
window rendition.
<p>
<li>
Wherever the former background character appears, it is changed to the new
background character.
<p>
</ul>
<p>
The
<i><a href="getbkgd.html">getbkgd()</a></i>
function extracts the specified window's background character and rendition.
</blockquote><h4><a name = "tag_002_001_295">&nbsp;</a>RETURN VALUE</h4><blockquote>
Upon successful completion,
<i>bkgd()</i>
and
<i>wbkgd()</i>
return OK.  Otherwise, they return ERR.
<p>
The
<i>bkgdset()</i>
and
<i>wbkgdset()</i>
functions do not return a value.
<p>
Upon successful completion,
<i><a href="getbkgd.html">getbkgd()</a></i>
returns the specified window's background character and rendition.
Otherwise, it returns (<b>chtype</b>)ERR.
</blockquote><h4><a name = "tag_002_001_296">&nbsp;</a>ERRORS</h4><blockquote>
No errors are defined.
</blockquote><h4><a name = "tag_002_001_297">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
These functions are only guaranteed to operate reliably on character sets in
which each character fits into a single byte, whose attributes can be
expressed using only constants with the A_ prefix.
</blockquote><h4><a name = "tag_002_001_298">&nbsp;</a>SEE ALSO</h4><blockquote>
<xref href=rendnew><a href="intov.html#tag_001_003_004">
Rendition
</a></xref>,
<i><a href="curses.h.html">&lt;curses.h&gt;</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
